#ifndef FINDANDLOOK_H_
#define FINDANDLOOK_H_

# include "stdio.h"
# include "stdlib.h"
# include "string.h"
# include "windows.h"

# include "all_struct.h"
# include "judge.h"
# include "display.h"

//tool.h
char * s_gets(char * st,int n);


//find.h (ADMIN
/**
	此部分函数由周珂宇、徐顺杰共同完成，
	周提供模板；徐初步coding ；周后期整理优化+补充note注释
*/

//查询特定旅客信息（通过昵称的唯一性），因为admin不能知道身份证。
static void find_SpecialGuestByID (Guest* guestHead,Airplane* airplaneHead)
{
	//inti
	Airplane* q ;
	Guest* p= guestHead->next ;
	if(p == NULL)
	{
		printf("当前旅客信息为空，请添加......\n");
	}
	else
	{
		char userName[20];
		printf("请输入用户名(ID)查询：");
		fflush(stdin);
		s_gets(userName,20);//预防非法输入

		if ( 0 == judgeUserNameExsit(guestHead,userName) )
			fprintf(stdout,"不存在使用该昵称的旅客\n");
		else
		{
			while (p)
			{
				if(0 == strcmp(p->userName,userName))
				{
					printf("该旅客可展示信息如下： \n");
					printf("\n----------------------------------------------------------\n");
					printf("用户名：%s\n",p->userName);
					printf("姓名：%s\n",p->realName);
//					printf("身份证：%s\n\n",p->passcard);
					printf("电话：%s\n",p->phone);
					printf("已购票量：%d\n\n",p->airnum);
					printf("账户余额：%lf\n\n",p->money);

					printf("  ** ** ** **  预定航班  ** ** ** **\n\n");
					if(0 != p->airnum)
					{
						q= airplaneHead->next ;
						printf("航班号\t起飞城市\t抵达城市\t所属公司\t所属型号\t起飞-抵达时间\t\t");
						printf("订单金额(元)\t订单状态\n");
						while (q && p ->airnum != 0)
						{
							if(q->personNumber == 0)
							{
								q = q -> next ;
								continue ;
							}

							for(int i = 0; i < q->personNumber ; i++)
								if (0 == strcmp (p->passcard, q->Guest[i].passcard))  //have book
								{
									Display4 (q);
									break;
								}

							q = q -> next ;
						}
						printf("\n  ** ** ** **  EOF  ** ** ** **\n");

					}
					else
						fprintf(stdout," > > 该顾客当前没有预定航班\n");

				}
				p = p->next;
			}
		}
		system("pause");
	}
}

//查询指定航班hao的旅客信息
static void find_GuestByFlightNumber(Airplane* airplaneHead)
{
	char flightNumber[25];
	Airplane* p = airplaneHead->next;
	printf("请输入航班号查询：");
	fflush(stdin);
	scanf("%s",flightNumber);
	while(p)
	{
		if(0 == strcmp(p->flightNumber,flightNumber))
		{
			if(p->personNumber == 0)
			{
				printf("该航班没有旅客预定.......\n");
			}
			else
			{
				printf("该航班一共有%d个旅客，信息如下: \n",p->personNumber);
				int i;
				for(i = 0; i < p->personNumber; i++)
				{
					printf("------------------ 旅客%d -------------------\n",i+1);
					printf("用户名：%s\n",p->Guest[i].userName);
					printf("真实姓名：%s\n",p->Guest[i].realName);
//					printf("身份证号：%s\n",p->Guest[i].passcard);
					printf("专属电话：%s\n",p->Guest[i].phone);
					printf("---------------------------------------------\n",i);
				}
			}
			break;
		}
		p = p->next;
	}
	if(!p)
	{
		printf("航班号有误！请检查.........\n\n");
	}
	system("pause");
}

//查询所有航班信息 (管理员)
static void find_AllAirplane(Airplane* airplaneHead)
{
	Airplane* p = airplaneHead->next;
	if(p == NULL)
	{
		printf("当前航班信息为空，请添加......\n");
	}
	else
	{
		printf("\n\n******************** 所有航班信息 ********************\n\n");

		printf("航班号\t起飞城市\t抵达城市\t所属公司\t所属型号\t起飞-抵达时间\t\t");
		printf("航班票价(元)\t票价折扣  折扣票价\t总票量\t剩余票量\n");
		while(p)
		{
			Display2(p);
			p = p->next;
		}
	}
	system("pause");

}

//查询所有旅客信息 (管理员)
static void find_AllGuest(Guest* guestHead,Airplane* airplaneHead)
{
	Airplane* q ;
	Guest* p= guestHead->next ;
	if(p == NULL)
	{
		printf("当前旅客信息为空，请添加......\n");
	}
	else
	{
		printf("\n\n******************** 所有旅客信息 ********************\n\n");
		printf("用户名\t\t姓名\t\t电话\t\t\t账户余额\t\t预定航班\n");
		printf("--------------------------------------------------------------------------------------------------\n");
		while(p)
		{
			printf("%s\t\t%5s\t\t%5s\t\t%5.3lf\t\t",p->userName,p->realName,p->phone,p->money);
			//预定航班搜寻
			if(0 != p->airnum)
			{
				q = airplaneHead->next ;
				int newairnum = 0;//判断有无过期票
				while (q && p ->airnum != 0)//有些重复了，但无伤大雅，就不改了
				{
					if(q->personNumber == 0)//减少不必要的循环判断
					{
						q = q -> next ;
						continue ;
					}

					for(int i = 0; i < q->personNumber ; i++)
						if (0 == strcmp (p->passcard, q->Guest[i].passcard))  //have booking
						{
							newairnum ++;
							printf("%s/",q->flightNumber);
							break;
						}

					q = q -> next ;
				}
				p->airnum = newairnum;//
				printf("已购票量：%d\n",p->airnum);

			}
			else
				fprintf(stdout," > > 该顾客当前没有预定过航班\n");

			printf("--------------------------------------------------------------------------------------------------\n");
			p = p->next;
		}
		printf("\n  ** ** ** **  EOF  ** ** ** **\n");

	}
	system("pause");

}

//根据航班号查询航班 (管理员)
static void find_AirplaneByNumber(Airplane* airplaneHead)
{
	char flightNumber[25];
	printf("请输入航班号：");
	fflush(stdin);
	scanf("%s",flightNumber);
	Airplane *p = airplaneHead->next;
	printf("\n\n-------------- 航班信息 -------------\n\n");
	printf("航班号\t起飞城市\t抵达城市\t所属公司\t所属型号\t起飞-抵达时间\t\t");
	printf("航班票价(元)\t票价折扣  折扣票价\t总票量\t剩余票量\n");
	while(p)
	{
		if(0 == strcmp(p->flightNumber,flightNumber))
		{
			Display2(p);
			break;
		}
		p = p->next;
	}
	if(p == NULL)
	{
		printf("抱歉！没有查询对应的航班...\n");

	}
	system("pause");

}

//根据起飞抵达城市查询航班 (管理员)
static void find_AirplaneByCity(Airplane* airplaneHead,int i)
{
	char startCity[25], endCity[25];

	printf("请输入起飞城市：");
	fflush(stdin);
	scanf("%s",startCity);
	printf("请输入抵达城市：");
	fflush(stdin);
	scanf("%s",endCity);

	Airplane *p = airplaneHead->next;
	Airplane *q = airplaneHead->next;
	Airplane *r = airplaneHead->next;

	int j = 0;

	printf("\n\n-------------- 航班信息 -------------\n\n");
	printf("航班号\t起飞城市\t抵达城市\t所属公司\t所属型号\t起飞-抵达时间\t\t");
	printf("航班票价(元)\t票价折扣  折扣票价\t总票量\t剩余票量\n");

	printf("对应起飞城市为此的航班：\n");
	Sleep (800);
	while(p != NULL)
	{
		if(!strcmp(p->startCity,startCity) )
		{
			i = -1;
			Display2(p);
		}

		p = p->next;
	}
	if (i != -1)
	{
		printf("无\n");
		j++ ;
	}


	printf("\n对应抵达城市为此的航班：\n");
	Sleep (800);
	while(q != NULL)
	{
		if( !strcmp(q->endCity,endCity) )
		{
			i = -5;
			Display2(q);
		}

		q = q->next;
	}
	if (i != -5)
	{
		printf("无\n");
		j++;
	}


	printf("\n对应起飞|抵达城市为此的航班：\n");
	Sleep (800);
	while(r != NULL)
	{
		if(!strcmp(r->startCity,startCity) && !strcmp(r->endCity,endCity) )
		{
			i = -1;
			Display2(r);
		}

		r = r->next;
	}
	if (i != -1)
	{
		printf("无\n");
		j++ ;
	}


	if( 3 == j )
		printf("没有查询到该条件的航班信息,请检查.....\n");

	system("pause");
}

//根据time查询航班 (管理员)
static void find_AirplaneBytime(Airplane* airplaneHead,int i)
{
	int month,day;
	int original_hour;
//	int original_minute;
	int end_hour;
//	int end_minute;

	printf("请输入month：");
//	fflush(stdin);
	scanf("%d",&month);
	printf("请输入day：");
//	fflush(stdin);
	scanf("%d",&day);
	printf("请输入orignalhour(若不清楚，请输入（0-23）以外的数)：");
//	fflush(stdin);
	scanf("%d",&original_hour);
	printf("请输入endhour(若不清楚，请输入（0-23）以外的数)：");
//	fflush(stdin);
	scanf("%d",&end_hour);

	Airplane *p = airplaneHead->next;
	printf("\n\n-------------- 航班信息 -------------\n\n");
	printf("航班号\t起飞城市\t抵达城市\t所属公司\t所属型号\t起飞-抵达时间\t\t");
	printf("航班票价(元)\t票价折扣  折扣票价\t总票量\t剩余票量\n");
	while(p != NULL)
	{

		if (original_hour < 0|| 23 < original_hour)
			if(p->time.month == month && p->time.day == day )
			{
				i = -1;
				Display2 (p);

			}

		if (original_hour >= 0 && 24 > original_hour)
			if (p->time.original_hour == original_hour && p->time.end_hour == end_hour
			        &&
			        p->time.month == month && p->time.day == day )
			{
				i = -1;
				Display2 (p);
			}

		p = p->next;

	}
	if(p == NULL && -1 != i)
		printf("没有查询到该条件的航班信息,请检查.....\n");

	system("pause");

}

//根据price查询航班 (管理员)
static void find_AirplaneByprice(Airplane* airplaneHead,int i)
{
	int price;

	printf("请输入票价：");
//	fflush(stdin);
	scanf("%d",&price);

	Airplane *p = airplaneHead->next;
	printf("\n\n-------------- 航班信息 -------------\n\n");
	printf("航班号\t起飞城市\t抵达城市\t所属公司\t所属型号\t起飞-抵达时间\t\t");
	printf("航班票价(元)\t票价折扣  折扣票价\t总票量\t剩余票量\n");
	while(p != NULL)
	{
		if(p->price == price)
		{
			i = -1;
			Display2(p);
		}
		p = p->next;
	}
	if(p == NULL && -1 != i)
		printf("没有查询到该条件的航班信息,请检查.....\n");

	system("pause");
}

//根据total_tickets查询航班 (管理员)
static void find_AirplaneBytoatl_tickets(Airplane* airplaneHead,int i)
{
	int ticketQuantity;

	printf("请输入票数：");
// fflush(stdin);
	scanf("%d",&ticketQuantity);

	Airplane *p = airplaneHead->next;
	printf("\n\n-------------- 航班信息 -------------\n\n");
	printf("航班号\t起飞城市\t抵达城市\t所属公司\t所属型号\t起飞-抵达时间\t\t");
	printf("航班票价(元)\t票价折扣  折扣票价\t总票量\t剩余票量\n");
	while(p != NULL)
	{
		if(p->ticketQuantity == ticketQuantity)
		{
			i = -1;
			Display2(p);
		}
		p = p->next;
	}
	if(p == NULL && -1 != i)
		printf("没有查询到该条件的航班信息,请检查.....\n");

	system("pause");
}

//根据remain_ticketsl查询航班 (管理员)
static void find_AirplaneByremain_tickets(Airplane* airplaneHead,int i)
{
	int remainQuantity;

	printf("请输入票数：");
//	fflush(stdin);
	scanf("%d",&remainQuantity);

	Airplane *p = airplaneHead->next;
	printf("\n\n-------------- 航班信息 -------------\n\n");
	printf("航班号\t起飞城市\t抵达城市\t所属公司\t所属型号\t起飞-抵达时间\t\t");
	printf("航班票价(元)\t票价折扣  折扣票价\t总票量\t剩余票量\n");
	while(p != NULL)
	{
		if(p->remainQuantity == remainQuantity)
		{
			i = -1;
			Display2(p);
		}
		p = p->next;
	}
	if(p == NULL && -1 != i)
		printf("没有查询到该条件的航班信息,请检查.....\n");

	system("pause");
}

//根据discount查询航班 (管理员)
static void find_AirplaneBydiscount(Airplane* airplaneHead,int i)
{
	double discount;

	printf("请输入折扣（0-1）：");
	fflush(stdin);
	scanf("%f", &discount);

	Airplane *p = airplaneHead->next;
	printf("\n\n-------------- 航班信息 -------------\n\n");
	printf("航班号\t起飞城市\t抵达城市\t所属公司\t所属型号\t起飞-抵达时间\t\t");
	printf("航班票价(元)\t票价折扣  折扣票价\t总票量\t剩余票量\n");
	while(p != NULL)
	{
		if(p->discount == discount)
		{
			i = -1;
			Display2(p);
		}
		p = p->next;
	}
	if(p == NULL && -1 != i)
		printf("没有查询到该条件的航班信息,请检查.....\n");

	system("pause");
}

//根据company查询航班 (管理员)
static void find_AirplaneBycompany(Airplane* airplaneHead,int i)
{
	char  company[25];

	printf("请输入公司：");
	fflush(stdin);
	scanf("%s",company);

	Airplane *p = airplaneHead->next;
	printf("\n\n-------------- 航班信息 -------------\n\n");
	printf("航班号\t起飞城市\t抵达城市\t所属公司\t所属型号\t起飞-抵达时间\t\t");
	printf("航班票价(元)\t票价折扣  折扣票价\t总票量\t剩余票量\n");
	while(p != NULL)
	{
		if(!strcmp(p->company,company))
		{
			i = -1;
			Display2(p);
		}
		p = p->next;
	}
	if(p == NULL && -1 != i)
		printf("没有查询到该条件的航班信息,请检查.....\n");

	system("pause");
}

//根据type查询航班 (管理员)
static void find_AirplaneBytype(Airplane* airplaneHead,int i)
{
	char  type[25];
//	int i = 0;

	printf("请输入型号：");
	fflush(stdin);
	scanf("%s",type);

	Airplane *p = airplaneHead->next;
	printf("\n\n-------------- 航班信息 -------------\n\n");
	printf("航班号\t起飞城市\t抵达城市\t所属公司\t所属型号\t起飞-抵达时间\t\t");
	printf("航班票价(元)\t票价折扣  折扣票价\t总票量\t剩余票量\n");
	while(p != NULL)
	{
		if(!strcmp(p->type,type))
		{
			i = -1;
			Display2(p);
		}
		p = p->next;
	}
	if(p == NULL && -1 != i)
		printf("没有查询到该条件的航班信息,请检查.....\n");

	system("pause");
}

//根据personNumber查询航班 (管理员)
static void find_AirplaneByguest(Airplane* airplaneHead,int i)
{
	int personNumber;

	printf("请输入已有乘客人数：");
	fflush(stdin);
	scanf("%d",&personNumber);

	Airplane *p = airplaneHead->next;
	printf("\n\n-------------- 航班信息 -------------\n\n");
	printf("航班号\t起飞城市\t抵达城市\t所属公司\t所属型号\t起飞-抵达时间\t\t");
	printf("航班票价(元)\t票价折扣  折扣票价\t总票量\t剩余票量\n");
	while(p != NULL)
	{
		if(p->personNumber == personNumber)
		{
			i = -1;
			Display2(p);
		}
		p = p->next;
	}
	if(p == NULL && -1 != i)
		printf("没有查询到该条件的航班信息,请检查.....\n");

	system("pause");
}


//look.h (guest
/**
	此部分函数由周珂宇、栗浩越共同完成，
	周提供模板；栗初步coding ；周：后期整理优化+补充note注释
*/

//旅客查看所有航班信息 (旅客)
static void lookAllAirplane(Airplane* airplaneHead)
{
	Airplane* p = airplaneHead->next;
	if(p == NULL)
	{
		printf("\n当前航班信息为空，请联系管理员添加......\n");
	}
	else
	{
		printf("\n\n******************** 所有航班信息 ********************\n");
		printf("航班号\t起飞城市\t抵达城市\t所属公司\t所属型号\t起飞-抵达时间\t\t");
		printf("折扣票价(元)\t剩余票量\n");
		while(p)
		{
			Display(p);
			p = p->next;
		}
	}
	system("pause");
}

//根据航班号查询航班 (guest)
static void lookAirplaneByNumber(Airplane* airplaneHead)
{
	char flightNumber[25];
	printf("请输入航班号：");
	fflush(stdin);
	scanf("%s",flightNumber);
	Airplane *p = airplaneHead->next;
	printf("\n\n-------------- 航班信息 -------------\n\n");
	printf("航班号\t起飞城市\t抵达城市\t所属公司\t所属型号\t起飞-抵达时间\t\t");
	printf("折扣票价(元)\t剩余票量\n");
	while(p)
	{
		if(0 == strcmp(p->flightNumber,flightNumber))
		{
			Display(p);
			break;
		}
		p = p->next;
	}
	if(p == NULL)
	{
		printf("抱歉！没有查询对应的航班...\n");

	}
	system("pause");

}

//根据起飞抵达城市查询航班 (guest)
static void lookAirplaneByCity(Airplane* airplaneHead,int i)
{
	char startCity[25], endCity[25];

	printf("请输入起飞城市：");
	fflush(stdin);
	scanf("%s",startCity);
	printf("请输入抵达城市：");
	fflush(stdin);
	scanf("%s",endCity);
	Airplane *p = airplaneHead->next;
	printf("航班号\t起飞城市\t抵达城市\t所属公司\t所属型号\t起飞-抵达时间\t\t");
	printf("折扣票价(元)\t剩余票量\n");
	while(p != NULL)
	{
		if(!strcmp(p->startCity,startCity) && !strcmp(p->endCity,endCity) )
		{
			i = -1;
			Display(p);
		}
		p = p->next;
	}
	if(p == NULL && -1 != i)
		printf("没有查询到该条件的航班信息,请检查.....\n");

	system("pause");

}

//根据time查询航班 (guest)
static void lookAirplaneBytime(Airplane* airplaneHead,int i)
{
	int month,day;
	int original_hour;
//	int original_minute;
	int end_hour;
//	int end_minute;


	printf("请输入month：");
//	fflush(stdin);
	scanf("%d",&month);
	printf("请输入day：");
//	fflush(stdin);
	scanf("%d",&day);
	printf("请输入orignalhour(若不清楚，请输入（0-23）以外的数)：");
//	fflush(stdin);
	scanf("%d",&original_hour);
	printf("请输入endhour(若不清楚，请输入（0-23）以外的数)：");
//	fflush(stdin);
	scanf("%d",&end_hour);

	Airplane *p = airplaneHead->next;
	printf("\n\n-------------- 航班信息 -------------\n\n");
	printf("航班号\t起飞城市\t抵达城市\t所属公司\t所属型号\t起飞-抵达时间\t\t");
	printf("折扣票价(元)\t剩余票量\n");
	while(p != NULL)
	{

		if (original_hour < 0|| 23 < original_hour)
			if(p->time.month == month && p->time.day == day )
			{
				i = -1;
				Display(p);

			}

		if (original_hour >= 0 && 24 > original_hour)
			if (p->time.original_hour == original_hour && p->time.end_hour == end_hour
			        &&
			        p->time.month == month && p->time.day == day )
			{
				i = -1;
				Display(p);
			}

		p = p->next;

	}
	if(p == NULL && -1 != i)
		printf("没有查询到该条件的航班信息,请检查.....\n");

	system("pause");
}

//根据price查询航班 (guest)
static void lookAirplaneByprice(Airplane* airplaneHead,int i)
{
	int price;

	printf("请输入票价：");
//	fflush(stdin);
	scanf("%d",&price);

	Airplane *p = airplaneHead->next;
	printf("\n\n-------------- 航班信息 -------------\n\n");
	printf("航班号\t起飞城市\t抵达城市\t所属公司\t所属型号\t起飞-抵达时间\t\t");
	printf("折扣票价(元)\t剩余票量\n");
	while(p != NULL)
	{
		if(p->price == price)
		{
			i = -1;
			Display(p);
		}
		p = p->next;

	}
	if(p == NULL && -1 != i)
		printf("没有查询到该条件的航班信息,请检查.....\n");

	system("pause");
}

//根据toatl_tickets查询航班 (guest)
static void lookAirplaneBytoatl_tickets(Airplane* airplaneHead,int i)
{
	int ticketQuantity;

	printf("请输入票数：");
//	fflush(stdin);
	scanf("%d",&ticketQuantity);

	Airplane *p = airplaneHead->next;
	printf("\n\n-------------- 航班信息 -------------\n\n");
	printf("航班号\t起飞城市\t抵达城市\t所属公司\t所属型号\t起飞-抵达时间\t\t");
	printf("折扣票价(元)\t剩余票量\n");
	while(p != NULL)
	{
		if(p->ticketQuantity == ticketQuantity)
		{
			i = -1;
			Display(p);
		}
		p = p->next;
	}
	if(p == NULL && -1 != i)
		printf("没有查询到该条件的航班信息,请检查.....\n");

	system("pause");
}

//根据remain_ticketsl查询航班 (guest)
static void lookAirplaneBydiscount(Airplane* airplaneHead,int i)
{
	int remainQuantity;

	printf("请输入票数：");
//	fflush(stdin);
	scanf("%d",&remainQuantity);

	Airplane *p = airplaneHead->next;
	printf("\n\n-------------- 航班信息 -------------\n\n");
	printf("航班号\t起飞城市\t抵达城市\t所属公司\t所属型号\t起飞-抵达时间\t\t");
	printf("折扣票价(元)\t剩余票量\n");
	while(p != NULL)
	{
		if(p->remainQuantity == remainQuantity)
		{
			i = -1;
			Display(p);
		}
		p = p->next;
	}
	if(p == NULL && -1 != i)
		printf("没有查询到该条件的航班信息,请检查.....\n");

	system("pause");
}

//根据discount查询航班 (guest)
static void lookAirplaneByremain_tickets(Airplane* airplaneHead,int i)
{
	double discount;

	printf("请输入折扣（0-1）：");
//	fflush(stdin);
	scanf("%lf", &discount);

	Airplane *p = airplaneHead->next;
	printf("\n\n-------------- 航班信息 -------------\n\n");
	printf("航班号\t起飞城市\t抵达城市\t所属公司\t所属型号\t起飞-抵达时间\t\t");
	printf("折扣票价(元)\t剩余票量\n");
	while(p != NULL)
	{
		if(p->discount == discount)
		{
			i = -1;
			Display(p);
		}
		p = p->next;
	}
	if(p == NULL && -1 != i)
		printf("没有查询到该条件的航班信息,请检查.....\n");

	system("pause");
}

//根据company查询航班 (guest)
static void lookAirplaneBycompany(Airplane* airplaneHead,int i)
{
	char  company[25];

	printf("请输入公司：");
	fflush(stdin);
	scanf("%s",company);

	Airplane *p = airplaneHead->next;
	printf("\n\n-------------- 航班信息 -------------\n\n");
	printf("航班号\t起飞城市\t抵达城市\t所属公司\t所属型号\t起飞-抵达时间\t\t");
	printf("折扣票价(元)\t剩余票量\n");
	while(p != NULL)
	{
		if(!strcmp(p->company,company))
		{
			i = -1;
			Display(p);
		}
		p = p->next;
	}
	if(p == NULL && -1 != i)
		printf("没有查询到该条件的航班信息,请检查.....\n");

	system("pause");
}

//根据航班type查询航班 (guest)
//此处尝试了sprintf @return int 的性质
static void lookAirplaneBytype(Airplane* airplaneHead,int i)
{
	char  type[25];
//	int i = 0;//玩点花活,运用下sprintf 的int性质

	printf("请输入型号：");
	fflush(stdin);
	scanf("%s",type);

	Airplane *p = airplaneHead->next;
	printf("\n\n-------------- 航班信息 -------------\n\n");
	printf("航班号\t起飞城市\t抵达城市\t所属公司\t所属型号\t起飞-抵达时间\t\t");
	printf("折扣票价(元)\t剩余票量\n");
	while(p != NULL)
	{
		if(strlen(p->type) == (i = sprintf(type,"%s",type)) )//玩点花活,运用下sprintf 的int性质
		{
			i = -1;
			Display(p);
		}
		p = p->next;
	}
	if(p == NULL && -1 != i)
		printf("没有查询到该条件的航班信息,请检查.....\n");

	system("pause");
}

# endif